import request from '@/utils/request'
import da from 'element-ui/src/locale/lang/da'

export function saveBudget(data) {
  return request({
    url: '/budget/save',
    method: 'put',
    data
  })
}
export function pageBudget(data) {
  return request({
    url: '/budget/page',
    method: 'post',
    data
  })
}
export function listBindCrafts(data) {
  return request({
    url: '/budget/listBindCrafts',
    method: 'post',
    data
  })
}
export function exportLightExcel(data) {

  return request({
    url: `/budget/exportLightAuxiliary/${data.customerId}/${data.engineerProjectId}`,
    method: 'get',
  })
}
export function saveProjects(data) {
  return request({
    url: '/budget/saveProjects',
    method: 'post',
    data
  })
}
export function getProjects(data) {
  return request({
    url: `/budget/getProjects/${data.customerId}/${data.engineerProjectId}`,
    method: 'get',
  })
}
export function saveBatch(data) {
  return request({
    url: '/budget/saveBatch',
    method: 'put',
    data
  })
}
export function setDiscountRate(data) {
  return request({
    url: '/engineerProject/setDiscountRate',
    method: 'post',
    data
  })
}
export function getDiscountRate(id) {
  return request({
    url: `/engineerProject/get/${id}`,
    method: 'get'
  })
}

export function getDiscountPrice(data) {
  return request({
    url: `/budget/getDiscountPrice/${data.customerId}/${data.engineerProjectId}`,
    method: 'get'
  })
}
